package com.demo.study.behavior.d01_chainOfResponsibility.base.filter;

import com.demo.study.behavior.d01_chainOfResponsibility.base.Filter;
import com.demo.study.behavior.d01_chainOfResponsibility.base.Msg;

/**
 * @author Baymax
 * @since 2021/1/17
 */
public class SensitiveFilter implements Filter {
    @Override
    public boolean doFilter(Msg msg) {
        if (msg.getMsg().contains("996")) {
            msg.setMsg(msg.getMsg().replace("996", ">>996<<"));
            return false;
        }
        return true;
    }
}
